package com.skcc.cop.mrtaxi4driver.util;

import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * Helper class providing methods and constants common to other classes in the
 * app.
 */
public final class GCMUtils {
	
    /**
     * Google API project id registered to use GCM.
     */
    public static final String SENDER_ID = "499627219416";


    /**
     * Intent used to display a message in the screen.
     */
    public static final String NOTIFY_CALL_MESSAGE_ACTION =
            					"com.skcc.cop.mrtaxi4driver.NOTIFY_CALL_MESSAGE";

    /**
     * Intent's extra that contains the message to be displayed.
     */
    public static final String EXTRA_MESSAGE = "message";
    public static final String REGISTRATION_ID = "registration_id";
    
    
    public static final String ON_REGISTRATIONID_RECEIVED_ACTION = 
    							"com.skcc.cop.mrtaxi4driver.ON_REGISTRATIONID_RECEIVED";
    

  /**
   * 
   * @param context
   * @param message
   */
    public static void notifyCallMessage(Context context, String message) {
        Intent intent = new Intent(NOTIFY_CALL_MESSAGE_ACTION);
        intent.putExtra(EXTRA_MESSAGE, message);
        context.sendBroadcast(intent);
   }
   
   
   public static void notifyOnRegIdReceived(Context context, String regId) {
        Intent intent = new Intent(ON_REGISTRATIONID_RECEIVED_ACTION);
        intent.putExtra(REGISTRATION_ID, regId);
        context.sendBroadcast(intent);
   }
   
}
